API Endpoints
Order
⚬ Get
An order object will not exist unless the payment is authorized.
Request
shell
json
GET https://api.sandbox.nymcard.com/api/v1.0/orders/<reference>/
You must replace reference with the merchant's unique reference ID.
Response
Excluding values at checkout POST
| Parameter | Type | Description |
|---|---|---|
| status | String | Either OPENED or COMPLETED * |
| total_refund | String | The amount of Refunds done on the order |
| employee_name | String | Reference ID |
| capture_expiration | String | Capture expiry time stamp |
- OPENED: The payment is authorized but not captured
- COMPLETE: The payment is captured
⚬ Capture
shell
This endpoint captures an order that has been approved by Nymcard's payment portal.
Request
POST https://api.sandbox.nymcard.com/api/v1.0/orders/<reference>/capture/
You must replace reference with the merchant's unique reference ID.
Response
| Parameter | Type | Description |
|---|---|---|
| status | String | Transaction status: SUCCESS or FAILURE |
| order_id | String | unique order uuid |
| amount | String | The amount captured (returned on SUCCESS) |
| currency | Currency | ISO 4217 order currency (returned on SUCCESS) |
| type | String | Transaction type "CAPTURE" (returned on SUCCESS) |
Exceptions
| Code | Description |
|---|---|
| 404 | Transaction does not exist |
⚬ Refund
shell
This endpoint refunds an order. This can be done at any time there is no window.
Request
POST https://api.sandbox.nymcard.com/api/v1.0/orders/<reference>/refund/
Query Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| total | Decimal | Total amount of the order, including tax, shipping and discount | |
| currency | Currency | ISO 4217 order currency |
You must replace reference with the merchant's unique reference ID.
Response
| Parameter | Type | Description |
|---|---|---|
| status | String | Transaction status: SUCCESS or FAILURE |
| order_id | String | unique order uuid |
| amount | String | The amount captured |
| currency | Currency | ISO 4217 order currency |
| type | String | Transaction type "REFUND" |
| transaction_id | String | unique uuid for the transaction |
Exceptions
| Code | Description |
|---|---|
| 406 | Transaction is already refunded or Transaction is still open |
| 404 | Transaction does not exist |