Skip to main content

Update Subscription

Update the payment card for an existing subscription.

Endpoint Information

Name: Update Card of Existing Subscription
Method: POST
URL: {{base_url}}/api/v1/payment/request

Description

To update the card associated with a subscription, make a 0 amount payment request including the subscription_id in additionalInfo. When the customer completes this 0-amount checkout, their new card will be saved to the subscription.

Authentication

Type: Basic Auth

  • Username: App Key
  • Password: Secret Key

Request Body

Content-Type: application/json

{
"amount": "0.00",
"isRecurring": 1,
"additionalInfo": {
"subscription_id": "209de9e7-c4d0-400e-b463-928ca1d6343a"
},
"merchantAccountId": "{{your_account_no}}",
"reference": "UpdateCard-001",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"country": "Sweden",
"currency": "USD"
}

Key Parameters

ParameterTypeRequiredDescription
amountstringYesMust be "0.00"
additionalInfo.subscription_idstringYesThe ID of the subscription to update

Response

Success Response

{
"success": true,
"message": "Payment request accepted",
"data": {
"payment_url": "https://sgw.paymid.com/secure-payment/2bfec39f-55dc-4f48-976b-9d37b1675007"
}
}