Repeat Payment
Sometimes you may wish to collect more money from a card, this is called a repeat payment. You use the original card id or a related payment id to start the transaction. Normally you can charge less or more than the original transaction (this is sometimes Payment Gateway dependent).
To be able to process repeat payments, depending on the Payment Gateway, you may need a merchant account with Continuous Authority permissions.
Method | Purpose |
---|---|
POST | Make another payment on a Card or from a Specific Payment |
POST
Action: Create a request to Repeat a card transaction.
Method: POST
URL: https://pay.smarterpay.com/SmarterPayCardPaymentService/api/transaction/{ID}
{ID} denotes ID of the card record.
Request Parameters
Property | Mandatory | Description |
---|---|---|
payment_type | True | Always set to 'Repeat'. |
platform | True | Always set to 'SmarterPayCloud'. |
amount | True | Amount of the repeat payment in the lowest denomination of the currency. No decimal places. For example, send pence if a GBP repeat. |
currency_code | False | ISO 4217 representation of the currency the transaction should take place in. If a currency has not been passed, we will assume the same currency should be used as the original transaction. |
internal_payment_description | False | A long description of the transaction for internal use only. Not seen by the customer. |
gateway_payment_description | False | A long description of the transaction that will be forwarded to the Payment Gateway. Depending on the Payment Gateway, this may or may not be seen by the customer. |
custom_reference | False | Custom reference set on record. |
isAsnyc | False | Set to true if you do not wish to wait for the result of the transaction. You will receive 202 Accepted if this is set to true. You can view the result of the transaction via the SmarterPay Cloud Portal or via a Webhook. |
related_payment_id | False | If you wish to make a repeat payment against a specific payment under the card, send the payment id in the request. |
metadata | False | Any additional data attached to the transaction. Recommendation to use key/value pairs or simple JSON structures. This will be sent out in any active Webhooks so can be used to tie information back to source records in another platform. |
Request Sample
{ "payment_type":"Repeat", "platform":"SmarterPayCloud", "amount":100, "currency_code":"GBP", "internal_payment_description":"Repeat for something", "gateway_payment_description":"Repeat for something sent to the gateway", "custom_reference":"MYREFERENCE0001" , "isAsnyc": false, "related_payment_id":"P01YZ96J1D7WDK8NEWD" }
Response Parameters
Property | Description |
---|---|
card_id | The ID of the card that the repeat took place under. |
payment_id | The unique ID of the repeat transaction. |
platform | The platform that the transaction took place on. Always 'SmarterPayCloud'. |
payment_type | The type of transaction. In this case 'Repeat'. |
payment_gateway | Confirmation of the Payment Gateway that the transaction took place on. |
status | Normalised result of the transaction. See the possible values here. |
status_details | Normalised result details of the transaction. See the possible values here. |
status_code | Normalised result code of the transaction. See the possible values here. |
gateway_status | The result of the transaction as sent by the Payment Gateway. See Payment Gateway documentation for possible values. |
gateway_status_details | Additional result details provided by the Payment Gateway. Not all Payment Gateways supply this. See Payment Gateway documentation for possible values. |
gateway_status_code | Additional result code provided by the Payment Gateway. Not all Payment Gateways supply this. See Payment Gateway documentation for possible values. |
Response Sample
{ "card_id": "CD01OQW39P4G97J56NXL", "payment_id": "P01QW39P4ODOY3P56NX", "platform": "SmarterPayCloud", "payment_type": "Repeat", "payment_gateway": "OpayoPi", "status": "successful", "status_details": "", "status_code": "", "gateway_status": "Ok", "gateway_status_details": "The Authorisation was Successful.", "gateway_status_code": "0000" }