For the purposes of making test customers call, you'll be using the customers simulator in your Testing Pays account.
To open the simulator interface, login to your Testing Pays account and click "OPEN" on the "customers" bookmark on your dashboard. You'll see the following sections in your simulator:
The simplest option is using cURL. To create a Stripe customer, at minimum you need a source (this is the card or bank account token you get back from tokens). Testing Pays also require you to send in an `account_balance` to trigger the various test scenarios. Using cURL, you need to submit these parameters as you would with a form POST.
Technically you don’t need any params to create customer, but this makes it very hard to identify them later! Be sure you include `description` and `email`. You can also add metadata here too, like on all the other Stripe APIs.
Next, your code needs to send the assembled request to the customers simulator. The URL to POST to can be found under the "Integration" tab of the simulator - make sure to copy&paste this URL from your simulator as it contains your unique API_KEY.
The example shown below shows how to make a customers request using cURL.
curl -X POST -u API_KEY: \
-d account_balance=10000 \
-d description=”T. Pais account” \
-d email=”tp@email.com” \
https://api.testingpays.com/API_KEY/stripe/v1/customers
The simulator will send back a JSON object that contains information about the customer - echoing back your call details along with the defaults
{
"id": "cus_0UEt8BuOdOaYr79bJ3i00sMA",
"object": "customer",
"account_balance": 100,
"created": 1550495681,
"currency": null,
"default_source": null,
"delinquent": false,
"description": null,
"discount": null,
"email": null,
"invoice_prefix": "lkUSL7v",
"invoice_settings": {
"custom_fields": null,
"footer": null
},
"livemode": false,
"metadata": {},
"shipping": null,
"sources": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/customers/cus_0UEt8BuOdOaYr79bJ3i00sMA/sources"
},
"subscriptions": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/customers/cus_0UEt8BuOdOaYr79bJ3i00sMA/subscriptions"
},
"tax_info": null,
"tax_info_verification": null
}
Managing billing for subscriptions - plans, upgrades, downgrades, etc.