Update an instance of payments with different phases of payment flows

POST /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json

Twilio enabled secure payments solution for accepting credit and ACH payments over the phone.

update an instance of payments with different phases of payment flows.

Path parameters

  • AccountSid string Required

    The SID of the Account that will update the resource.

  • CallSid string Required

    The SID of the call that will update the resource. This should be the same call sid that was used to create payments resource.

  • Sid string Required

    The SID of Payments session that needs to be updated.

application/x-www-form-urlencoded

Body

  • Capture string

    The piece of payment information that you wish the caller to enter. Must be one of payment-card-number, expiration-date, security-code, postal-code, bank-routing-number, or bank-account-number.

    Values are payment-card-number, expiration-date, security-code, postal-code, bank-routing-number, or bank-account-number.

  • IdempotencyKey string Required

    A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated.

  • Status string

    Indicates whether the current payment session should be cancelled or completed. When cancel the payment session is cancelled. When complete, Twilio sends the payment information to the selected connector for processing.

    Values are complete or cancel.

  • StatusCallback string(uri) Required

    Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the Update and Complete/Cancel POST requests.

Responses

  • 202

    Accepted

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the Payments resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • call_sid string | null

      The SID of the Call the resource is associated with.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CA[0-9a-fA-F]{32}$.

    • date_created string(date-time-rfc-2822) | null

      The RFC 2822 date and time in GMT that the resource was created

    • date_updated string(date-time-rfc-2822) | null

      The RFC 2822 date and time in GMT that the resource was last updated

    • sid string | null

      The SID of the Payments resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^PK[0-9a-fA-F]{32}$.

    • uri string(uri) | null

      The URI of the resource, relative to https://api.twilio.com

POST /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json
curl \
 -X POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'Capture=payment-card-number&IdempotencyKey=string&Status=complete&StatusCallback=https%3A%2F%2Fexample.com'
Request example
{
  "Capture": "payment-card-number",
  "IdempotencyKey": "string",
  "Status": "complete",
  "StatusCallback": "https://example.com"
}
Response examples (202)
{
  "account_sid": "string",
  "call_sid": "string",
  "date_created": "string",
  "date_updated": "string",
  "sid": "string",
  "uri": "https://example.com"
}