Skip to main content
Version: 0.10.0

Zip Payments API Documentation

Usage​

The shortest path to accepting payments is to create a source and use that source to create a charge.

1. Create a Source​

Source Request​

{
"currency": "php",
"type": "gcash",
"redirect": {
"success": "https://google.com?status=success",
"fail": "https://google.com?status=fail"
}
}

Source Response​

{
"object": "source",
"id": "src_017b24c08a007edc6433ceb2ea123c34",
"type": "gcash",
"card": null,
"redirect": {
"success": "https://google.com?status=success",
"fail": "https://google.com?status=fail"
},
"vaulted": false,
"used": false,
"livemode": false,
"created_at": "2021-08-08T15:53:23.227251+08:00"
}

2. Create a Charge​

Charge Request​

{
"amount": 5000,
"currency": "php",
"source": "src_017b24c08a007edc6433ceb2ea123c34",
"description": "Board Rental",
"statement_descriptor": "Surf Shack",
"capture": true
}

Charge Response​

{
"object": "charge",
"id": "ch_017b24c343a2c0e797a7a39bcb183f5d",
"amount": 5000,
"amount_refunded": 0,
"captured": false,
"currency": "php",
"statement_descriptor": "Surf Shack",
"description": "Board Rental",
"source": {
"object": "source",
"id": "src_017b24c08a007edc6433ceb2ea123c34",
"type": "gcash",
"card": null,
"redirect": {
"success": "https://google.com?status=success",
"fail": "https://google.com?status=fail"
},
"vaulted": false,
"used": true,
"livemode": false,
"created_at": "2021-08-08T15:53:23.227251+08:00"
},
"action": {
"url": "https://payments.gcash.com/xxxxx/",
"type": "redirect_to_url"
},
"refunds": [],
"status": "pending",
"livemode": false,
"created_at": "2021-08-08T15:56:21.827531+08:00",
"updated_at": "2021-08-08T15:56:21.827531+08:00"
}

Redirect your users to the action.url page for authentication. Whatever the outcome will be, it will redirect back to the success or fail URLs you defined during source creation. You may execute some custom flow at this point.

Authentication​

Security Scheme Type:

http

HTTP Authorization Scheme:

basic