Create recurring payment
Creates a payment for a recurring account. This operation is synchronous and does not require the user to be involved. The payment result will be returned directly.
info
The recurring account must be activated through the client API before payments can be made. Get recurring account to verify that the account status is ACTIVE.
Request
your-authorization
should be replaced with your Authorization header, see Accessyour-user-id
in the URI, should be replaced with your identifier of the useraccountId
in the request body, id for the recurring account to use for the payment
POST /v1/users/{your-user-id}/recurring-payments
Content-Type: application/json
Accept: application/json
Authorization: $(your-authorization)
Request Body schema: application/json
Payment details
object (RecurringPaymentCreateDto) | |||||||
|
application/json
{- "payment": {
- "accountId": "e830de7e-4024-229b-fbc5-b06e66d2e6c1",
- "amount": 123.12,
- "purchaseReference": "purchaseReference"
}
}
Response
Success
Response Schema: application/json
object (RecurringPaymentDto) | |||||||||||||
|
application/json
{- "payment": {
- "accountId": "sdk-test-swish",
- "amount": 123.12,
- "merchantId": "sdk-test-merchant",
- "purchaseReference": "purchaseReference",
- "currency": "SEK",
- "id": "id"
}
}
Error responses
Please refer to our HTTP response codes and Error codes to learn what error responses you may expect from the API.
Example
- curl
- Python
- Java
- C#
- Node.js
Try it
Loading...